package com.engine4cloud.tdf.supervision.dto.create;

import com.engine4cloud.tdf.supervision.dto.JzdxFileDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 迁居
 *
 * @author wenjie
 * @date 2024-05-30 15:21:31
 */
@Data
@Schema(description = "迁居-请求对象")
public class SpMigrateCreateDTO implements Serializable {

    /**
     * 矫正人员编号
     */
    @Schema(description = "矫正人员编号")
    @NotBlank(message = "社区矫正人员编号不能为空")
    private String rybh;

    /**
     * 申请时间
     */
    @Schema(description = "申请时间", example = "2024-05-01 00:00:00")
    @NotNull(message = "申请时间不能为空")
    private LocalDateTime sqsj;

    /**
     * 原居住地明细
     */
    @Schema(description = "原居住地明细")
    @NotBlank(message = "原居住地明细不能为空")
    private String yjzdmx;

    /**
     * 迁入地明细
     */
    @Schema(description = "迁入地明细")
    @NotBlank(message = "迁入地明细不能为空")
    private String qrdmx;

    /**
     * 变更理由
     */
    @Schema(description = "变更理由")
    @NotBlank(message = "变更理由不能为空")
    private String bgly;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String bz;

    /**
     * 原居住地（乡镇、街道）
     */
    @Schema(description = "原居住地（乡镇、街道）", example = "[\"460000\",\"460100\",\"460108\",\"31903\"]")
    @NotEmpty(message = "原居住地（乡镇、街道）不能为空")
    @Size(min = 3, message = "原居住地（乡镇、街道）至少选三级")
    private List<String> sourceAreaList;

    /**
     * 迁入地（乡镇、街道）
     */
    @Schema(description = "迁入地（乡镇、街道）", example = "[\"460000\",\"460100\",\"460108\",\"30432\"]")
    @NotEmpty(message = "迁入地（乡镇、街道）不能为空")
    @Size(min = 3, message = "迁入地（乡镇、街道）必须至少选三级")
    private List<String> targetAreaList;

    /**
     * 文书材料
     */
    @Schema(description = "文书材料", example = """
            [{"name": "张三.png",
            "url": "/supervision/oss-file/oss/file?fileName=09468fc20f2544e28891a058858fdf58.jpeg"}
            ]""")
    @NotEmpty(message = "相关法律文书不能为空")
    private List<JzdxFileDTO> instrumentList;
}